]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popup-menu: Expand switch menu items
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 28 Jul 2011 14:59:10 +0000 (16:59 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 29 Aug 2011 20:11:14 +0000 (22:11 +0200)
Given that our menus contain at most two columns, all switch widgets
in menus end up in the last columns, and thus aligned with the right
menu edge.
However, the updated user status menu will contain a section which
ignores the menu's column layout, so the switch might end up in
the middle of the menu if the overall width is determined by said
section.
At least for now, we always want the switch to align with the end,
so just expand switch menu items rather than adding an option.

https://bugzilla.gnome.org/show_bug.cgi?id=652837

js/ui/popupMenu.js

index 07264f3db49c179b7403e96730911183843b2672..c272de72373f226e104db457f80a9e5d30dbb5c8 100644 (file)
@@ -717,7 +717,8 @@ PopupSwitchMenuItem.prototype = {
         this.addActor(this.label);
 
         this._statusBin = new St.Bin({ x_align: St.Align.END });
-        this.addActor(this._statusBin, { align: St.Align.END });
+        this.addActor(this._statusBin,
+                      { expand: true, span: -1, align: St.Align.END });
 
         this._statusLabel = new St.Label({ text: '',
                                            style_class: 'popup-inactive-menu-item'